using UnityEngine;
using QFramework;
using ProjectSurvivor;
using QAssetBundle;

namespace QFrameworkSurvivor
{
	public partial class TreasureChest : PowerUp
	{
        protected override Collider2D Collider2D => SelfCollider2D;

        protected override void Execute()
        {
            AudioKit.PlaySound(Sfx.TREASUER_CHEST);
            UIGamePanel.OpenTreasurePanel.Trigger();
            this.DestroyGameObjGracefully();
        }
        private void OnTriggerEnter2D(Collider2D other)
        {
            if (other.GetComponent<CollectableArea>())
            {
                FlyingToPlayer = true;
            }
        }
    }
}
